//
//  BHSingleButton.m
//  Behing
//
//  Created by Lj on 2017/10/19.
//  Copyright © 2017年 lj. All rights reserved.
//

#import "BHSingleButton.h"
#import "UIImage+Color.h"

@implementation BHSingleButton

- (void)drawRect:(CGRect)rect {
    self.titleLabel.font = BHFont_Size_18;
    [self setTitleColor:Text_Color_FFFFFF forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage createImageWithColor:Bg_Color_333333] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage createImageWithColor:Bg_Color_333333] forState:UIControlStateHighlighted];
    
    self.layer.masksToBounds = YES;
    self.layer.cornerRadius = 10;
}

- (BHSingleButton *(^)(NSString *buttonName))button_name {
    return ^id(NSString *name) {
        [self setTitle:name forState:UIControlStateNormal];
        return self;
    };
}

//- (BHSingleButton *(^)(UIColor *buttonTitleColor))button_title_color {
//    return ^id(UIColor *buttonTitleColor) {
//        [self setTitleColor:buttonTitleColor forState:UIControlStateNormal];
//        return self;
//    };
//}

@end
